package com.ham.mud.characters;

import com.ham.mud.ServerConnection;

/**
 * Created by hlucas on Jul 7, 2011 at 11:50:23 AM
 */
public class Stats {
    int strength;
    int constitution;
    int dexterity;
    int intelligence;
    int wisdom;
    int charisma;

    public Stats(int strength, int constitution, int dexterity, int intelligence, int wisdom, int charisma) {
        this.strength = strength;
        this.constitution = constitution;
        this.dexterity = dexterity;
        this.intelligence = intelligence;
        this.wisdom = wisdom;
        this.charisma = charisma;
    }

    public int getStrength() {
        return strength;
    }

    public void setStrength(int strength) {
        this.strength = strength;
    }

    public int getConstitution() {
        return constitution;
    }

    public void setConstitution(int constitution) {
        this.constitution = constitution;
    }

    public int getDexterity() {
        return dexterity;
    }

    public void setDexterity(int dexterity) {
        this.dexterity = dexterity;
    }

    public int getIntelligence() {
        return intelligence;
    }

    public void setIntelligence(int intelligence) {
        this.intelligence = intelligence;
    }

    public int getWisdom() {
        return wisdom;
    }

    public void setWisdom(int wisdom) {
        this.wisdom = wisdom;
    }

    public int getCharisma() {
        return charisma;
    }

    public void setCharisma(int charisma) {
        this.charisma = charisma;
    }

    public void display(ServerConnection connection) {
        connection.print("Str: " + strength);
        connection.print(" Con: " + constitution);
        connection.print(" Dex: " + dexterity);
        connection.print(" Int: " + intelligence);
        connection.print(" Wis: " + wisdom);
        connection.println(" Cha: " + charisma);
    }

    public void add(Stats stats) {
        this.strength += stats.getStrength();
        this.constitution += stats.getConstitution();
        this.dexterity += stats.getDexterity();
        this.intelligence += stats.getIntelligence();
        this.wisdom += stats.getWisdom();
        this.charisma += stats.getCharisma();
    }
}
